# -*- coding: utf-8 -*-
import pandas as pd

pd.set_option('display.max_rows',None) #显示所有行
pd.set_option('display.max_columns',None) #显示所有列
pd.set_option('display.width',1000) #设置列宽度1000

#file = 'C:/work/cl/110000000005810E151011180731511000100.txt' #粤科
#file = 'C:/work/cl/110000000005960U019030190322511003900.txt' #兴宁珠江
#file = 'C:/work/cl/110000000005810K992055190815511000400.txt' #客商
file = 'C:/work/cl/110000000005810655A002190916511000100.txt' #粤电

jibenhu_count = 0
xindaihu_count = 0
jiben_xindai_count = 0


# 读取数据，分配到信息类型装载区
for line in open(file):
    if line[61:62] == '1':  # 基本户
        jibenhu_count += 1
    elif line[61:62] == '2': #信贷户
        xindaihu_count += 1
    elif line[61:62] == '3': #既是基本户又是信贷户
        jiben_xindai_count += 1
    elif line[61:62] == '4': #未知
        pass

#信息展示区
print('基本户客户数：',jibenhu_count)
print('信贷户客户数：',xindaihu_count)
print('既是基本户又是信贷户客户数：',jiben_xindai_count)